<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@page import="com.is.model.*"  %>
<%@page import="com.is.control.ParamStuyearControl"%>
<%@page import="java.util.List"%>
<%@page import="com.is.control.ParamStuyearTypeControl"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="shortcut icon" href="/InterStu/resources/image/favicon.ico" />
<link rel="stylesheet" type="text/css" href="../../resources/css/all.css" />
<script type="text/javascript" src="../../resources/js/jquery-1.8.1.js"></script>
<link href="../../resources/css/default.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../../resources/js/jquery.artDialog.js"></script>
<script type="text/javascript" src="../../resources/js/iframeTools.js"></script>
<script type="text/javascript" src="../../resources/js/WebCalendar.js"></script>
<script type="text/javascript">
	$(function(){
		var block = $("#magic_block");
		if($(".active a").position()){
			block.css("top",$(".active a").position().top+10)
			.data("oriTop",$(".active a").position().top)
		}
		$(".nav ul li").find("a").hover(
			function(){
				var $this = $(this);
				var newTop = $this.position().top;
				block.stop().animate({
					top:newTop+10
				})
			},
			function(){
				block.stop().animate({
					top:block.data("oriTop")+10
				})
			}
		)
		var h = $(".right").height();
		$(".left").height(h);
		$(".update").click(function(){
			$.dialog.open("/InterStu/update_info.jsp",{width:460,height:400,title:"个人信息"});
		})
		$('img').error(function(){
			this.src = "/InterStu/resources/image/man.GIF";
		})
		$(".lack_gs").click(function(){
			$.dialog.open("setAttendanceGS.jsp",{width:400,height:200, cancel:true,cancelVal:"返回",title:"出勤计算公式"});
		})
	})
</script>
<title>留学生预科班</title>
</head>
<% 
	 User cu =(User)session.getAttribute("user"); 
%>
<body>
<div class="header">
	<div class="title pr">
    	<a href="javascript:void(0);"><span class="update pa">个人信息</span></a>
        <span class="logout pa"><a class="hide" href="/InterStu/login/logout.jsp">退出</a></span>
    </div>
</div>
<div class="main">
	<div class="left"> 
		<div class="infomation">
			<div class="photo">
			<%
			String picUrl = cu.getPicUrl();
			if(session.getAttribute("picUrl")!=null){
			    picUrl = "/InterStu/User/UserHeadImage/"+(String)session.getAttribute("picUrl");
			}	
			%>
				<img width='60' height="60" src = "<%=picUrl %>" />
			</div>
			<div class="welcome">
				<%=cu.getName() %>,<br/>
				欢迎您使用！
			</div>
		</div>  	
    	<div class="nav">
        	<ul>	
            	<li class="pa" id="magic_block"></li>
                <li class="active"><a href="/InterStu/pages/stuyear/stuyear_start.jsp">新学期设置</a></li>
                <li><a href="/InterStu/pages/users/user_all.jsp">用户管理</a></li>
                <li><a href="/InterStu/pages/students/student_add.jsp">学生管理</a></li>
                <li><a href="/InterStu/pages/dictation/dictation_add.jsp">学生考核</a></li>
                <li><a href="/InterStu/pages/assess/teacher_assess.jsp">教职人员管理</a></li>
            </ul>
        </div>
    </div>
    <div class="right">
    	<div class="r1">
    	<table class="term tab">
    <tr>
    	<td>
    		<a class="current" href="/InterStu/pages/stuyear/stuyear_start.jsp">学期开关</a>
		</td>
		<td>
			<a href="../paramClass/param_class_add.jsp">班级设置</a>
		</td>
		<td>
			<a href="/InterStu/pages/paramCourse/course.jsp">添加课程</a> 
		</td>
    </tr>
    </table>
	<%
		  int isStart = ParamStuyearControl.getCurrentStuyearId();
	     	if(isStart==0){
	 %>
	<form action="stuyear_go.jsp" method="post">
	<table class="table">
	<caption>这是每学期系统使用的第一步：
	填写本学年信息(tip:2012-2013 春季/秋季学期)</caption>
	<tr><td>学期</td><td><input type="text" name="stuyear" /></td></tr>
	<tr>
	<td>开始时间</td>
	<td><input type="text" name="startTime" id="startTime" onclick="SelectDate(this,2008,2020,'yyyy-MM-dd')" readonly style="cursor:pointer" />
	</td>
	</tr>
	<tr>
	<td>结束时间
	</td>
	<td><input type="text" name="endTime"  id="endTime" onclick="SelectDate(this,2008,2020,'yyyy-MM-dd')" readonly style="cursor:pointer" /></td>
	</tr>
	<tr><td>学期类型</td><td><select name="stuyearType">
	<%
	         List<ParamStuyearType> stuyearTypes  = ParamStuyearTypeControl.getAllStuyearTypes();
	         for(ParamStuyearType type:stuyearTypes){
	%>
	<option value="<%=type.getId() %>"><%=type.getTypeName() %></option>
	<%} %>
	</select></td></tr>
	<tr><td colspan="4"><input type="submit" value="开启"/></td></tr>
	</table>
	</form>
	<%}else{
	%>
	当前阶段的学期任务已经开始，无需再进行此操作。<br></br>
	若要进行班级添加设置，请点击<a href="../paramClass/param_class_add.jsp">班级设置</a>
	<br></br>
	若要设置当前学期缺勤计算公式，请点击<a class="lack_gs" href="javascript:void(0);">缺勤公式</a>
	<%} %>
        </div>
        
    </div>
</div>
<div class="footer">
	<p>版权所有：东北师范大学留学生预科部&nbsp;&nbsp;  蓝旭工作室开发</p>
</div>
</body>
</html>
